package com.ruoyi.webshop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.webshop.mapper.GoodsSafeguardTypeMapper;
import com.ruoyi.webshop.domain.GoodsSafeguardType;
import com.ruoyi.webshop.service.IGoodsSafeguardTypeService;

/**
 * 增值保障Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-17
 */
@Service
public class GoodsSafeguardTypeServiceImpl implements IGoodsSafeguardTypeService 
{
    @Autowired
    private GoodsSafeguardTypeMapper goodsSafeguardTypeMapper;

    /**
     * 查询增值保障
     * 
     * @param safeguardTypeId 增值保障主键
     * @return 增值保障
     */
    @Override
    public GoodsSafeguardType selectGoodsSafeguardTypeBySafeguardTypeId(Long safeguardTypeId)
    {
        return goodsSafeguardTypeMapper.selectGoodsSafeguardTypeBySafeguardTypeId(safeguardTypeId);
    }

    /**
     * 查询增值保障列表
     * 
     * @param goodsSafeguardType 增值保障
     * @return 增值保障
     */
    @Override
    public List<GoodsSafeguardType> selectGoodsSafeguardTypeList(GoodsSafeguardType goodsSafeguardType)
    {
        return goodsSafeguardTypeMapper.selectGoodsSafeguardTypeList(goodsSafeguardType);
    }

    /**
     * 新增增值保障
     * 
     * @param goodsSafeguardType 增值保障
     * @return 结果
     */
    @Override
    public int insertGoodsSafeguardType(GoodsSafeguardType goodsSafeguardType)
    {
        return goodsSafeguardTypeMapper.insertGoodsSafeguardType(goodsSafeguardType);
    }

    /**
     * 修改增值保障
     * 
     * @param goodsSafeguardType 增值保障
     * @return 结果
     */
    @Override
    public int updateGoodsSafeguardType(GoodsSafeguardType goodsSafeguardType)
    {
        return goodsSafeguardTypeMapper.updateGoodsSafeguardType(goodsSafeguardType);
    }

    /**
     * 批量删除增值保障
     * 
     * @param safeguardTypeIds 需要删除的增值保障主键
     * @return 结果
     */
    @Override
    public int deleteGoodsSafeguardTypeBySafeguardTypeIds(Long[] safeguardTypeIds)
    {
        return goodsSafeguardTypeMapper.deleteGoodsSafeguardTypeBySafeguardTypeIds(safeguardTypeIds);
    }

    /**
     * 删除增值保障信息
     * 
     * @param safeguardTypeId 增值保障主键
     * @return 结果
     */
    @Override
    public int deleteGoodsSafeguardTypeBySafeguardTypeId(Long safeguardTypeId)
    {
        return goodsSafeguardTypeMapper.deleteGoodsSafeguardTypeBySafeguardTypeId(safeguardTypeId);
    }
}
